<%--
  Created by IntelliJ IDEA.
  User: 60223
  Date: 2021/7/20
  Time: 20:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<style type="text/css">
    @import url("/css/video_management.css");
</style>
<head>
    <title>视频管理</title>
</head>
<script src="/js/jquery/jquery-3.3.1.js"></script>
<script>
    $(function (){
        var videoList=${requestScope.videosList};

    })
</script>
<body>
<div>
    <header class="header">
        <h1><img style="height: 50px;width: 180px"
                 src=""
                 alt="">
        </h1>
        <form>
            <input type="text" name="search" placeholder="Search.." class="search">
        </form>
        <button class="searchButton searchButton2">立即搜索</button>
        <div class="login">
            <!-- 登录 -->
            <!-- 注册 -->
            <span><a href="login_user.jsp"><input type="button" class="dlspan" value="登 录"/></a></span>&nbsp;&nbsp;
            <span><a href="register_user.jsp"><input type="button" class="zcspan" value="注 册"/></a></span>
        </div>
    </header>
    <div class="topNav">
        <!-- 导航栏 -->
        <div style="float: left;">
            <button style="" class="links_button button dropdown">
                <a href="tuijian.jsp" style="text-decoration: none">推荐</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="yingshi.jsp" style="text-decoration: none">影视</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="yinyue.jsp" style="text-decoration: none">音乐</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="youxi.jsp" style="text-decoration: none">游戏</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="tiyu.jsp" style="text-decoration: none">体育</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="zongyi.jsp" style="text-decoration: none">综艺</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="yule.jsp" style="text-decoration: none">娱乐</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="dongman.jsp" style="text-decoration: none">动漫</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="shenghuo.jsp" style="text-decoration: none">生活</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="meishi.jsp" style="text-decoration: none">美食</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
            <button style="" class="links_button button dropdown">
                <a href="chongwu.jsp" style="text-decoration: none">宠物</a>
                <span class="dropdown-content">
		                    <a href="#">1</a>
		                    <a href="#">2</a>
		                    <a href="#">3</a>
		                </span>
            </button>
        </div>
    </div>

    <ul class="vertical">
        <li><a href="watch_history.jsp" class="verticalLiA">观看历史</a></li>
        <li><a href="user_center.jsp" class="verticalLiA">个人信息</a></li>
        <li style="background-color: deepskyblue"><a href="/videos/my_video?userId=${sessionScope.users.id}" class="verticalLiA">视频管理</a></li>
        <li><a href="#" class="verticalLiA">我的关注</a></li>
        <li><a href="#" class="verticalLiA">我的粉丝</a></li>
    </ul>
    <div class="micro">
        <div id="managementbody">
            <div id="root">
                <div class="micro--2kLg8">
                    <div class="card--cdv2- full--3ADOq">
                        <div class="title--content--management">内容管理</div>
                        <div class="profit-container">
                            <div class="upload--video--button">
                                <svg width="41" height="41" viewBox="0 0 41 41" fill="none" class="icon--2_YqN">
                                    <path fill-rule="evenodd" clip-rule="evenodd"
                                          d="M5.923 21.234c-.022-.28-.022-.54-.022-.825 0-8.1 6.589-14.688 14.689-14.688s14.689 6.588 14.689 14.688c0 8.1-6.589 14.689-14.69 14.689h-.598a3.747 3.747 0 01-3.565-2.995c-.656-3.822-3.708-6.845-7.558-7.473-1.626-.342-2.881-1.74-2.967-3.45v-.2l.022.254zm20.4.887c-1.826 1.882-4.1363.252-6.76 3.879-1.255.285-2.567-.456-2.938-1.654a14.856 14.856 0 01-.541-3.908c0-1.34.2-2.652.541-3.879a2.446 2.446 0 012.938-1.683c2.624.628 4.934 1.997 6.76 3.88.884.912.884 2.452 0 3.365z"
                                          fill="url(#xiguaV2_svg__paint0_linear)"></path>
                                </svg>
                                <div class="text--join">
                                    <div class="title--join-create">加入视频发布计划，视频播放也可获得创作收益！</div>
                                    成功加入计划后，通过抖鱼视频发布原创横屏视频（时长≥1分钟）可享受相应的创作收益。
                                </div>
                                <button class="join--button" type="button"><span
                                        class="join--button-connect">发布视频</span></button>
                            </div>
                        </div>
                        <div>
                            <span><h3>我的视频</h3></span>
                            <table class="my-video">
                                <thead>
                                <tr>
                                    <th>序号</th><th>视频封面</th><th>视频标题</th><th>发布时间</th><th>播放量</th><th>点赞量</th><th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <c:choose>
                                    <c:when test="${empty requestScope.videosList }">
                                        <tr>
                                            <td colspan="7">你还未发布视频</td>
                                        </tr>
                                    </c:when>
                                    <c:otherwise>
                                        <c:forEach items="${requestScope.videosList}" var="videos" varStatus="c">
                                            <tr style="background-color: white">
                                                <td>${c.count}</td>
                                                <td><img src="${videos.logo}" width="100"></td>
                                                <td>${videos.title}</td>
                                                <td>
                                                    <fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${videos.addTime}"/>
                                                </td>
                                                <td>${videos.playNum}</td>
                                                <td>${videos.likeNum}</td>
                                                <td>
                                                    <a href="/videos/delete?id=${videos.id}" >删除</a>
                                                </td>
                                            </tr>
                                        </c:forEach>
                                    </c:otherwise>
                                </c:choose>

                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>

